@@ -130,6 +130,13 @@ span.btn-file .form-group {
|
||
| 130 | 130 |
text-align: center; |
| 131 | 131 |
i { font-size: 220px; color: #AFB4BF; }
|
| 132 | 132 |
} |
| 133 |
+ .editor-reward-empty {
|
|
| 134 |
+ height: 296px; |
|
| 135 |
+ border: none; |
|
| 136 |
+ text-align: center; |
|
| 137 |
+ font-style: oblique; |
|
| 138 |
+ i { font-size: 220px; color: #AFB4BF; }
|
|
| 139 |
+ } |
|
| 133 | 140 |
.centered-editor-new {
|
| 134 | 141 |
width: 350px; |
| 135 | 142 |
margin-left: auto; |
@@ -1,3 +1,5 @@ |
||
| 1 |
+<% title "#{t 'mission.mission_control'} - #{@config.website_name}" %>
|
|
| 2 |
+ |
|
| 1 | 3 |
<%= render :partial => "mission_details", locals: {mission: @mission} %>
|
| 2 | 4 |
<%= render :partial => 'mission_tabs', locals: {mission: @mission} %>
|
| 3 | 5 |
|
@@ -11,49 +13,59 @@ |
||
| 11 | 13 |
<%= content_tag(:div, class: 'span8') do %> |
| 12 | 14 |
<%= content_tag(:h4, ((t 'mission_control.agent_steps_validation') + ':') ) %> |
| 13 | 15 |
|
| 14 |
- <% @submissions.each do |submission| %> |
|
| 15 |
- <%= content_tag(:div, class: 'panel panel-default') do %> |
|
| 16 |
- <%= content_tag(:div, class: 'panel-heading') do %> |
|
| 17 |
- <%= content_tag(:h3, class: 'panel-title') do %> |
|
| 18 |
- <%= content_tag(:span, '<i class="fa fa-comment"></i>'.html_safe, class: 'task-icon mission-control') %> |
|
| 19 |
- <%= link_to ('#colapse_submission_'+ submission.id.to_s ), class: 'accordion-toggle', data: {toggle: 'collapse', parent: '#colapse_submissions'} do %>
|
|
| 20 |
- <%= content_tag(:span, '', class: 'caret')%> |
|
| 21 |
- <%= content_tag(:span, submission.agent_step.title, class: 'task-text') %> |
|
| 16 |
+ <% if @submissions.count > 0 %> |
|
| 17 |
+ <% @submissions.each do |submission| %> |
|
| 18 |
+ <%= content_tag(:div, class: 'panel panel-default') do %> |
|
| 19 |
+ <%= content_tag(:div, class: 'panel-heading') do %> |
|
| 20 |
+ <%= content_tag(:h3, class: 'panel-title') do %> |
|
| 21 |
+ <%= content_tag(:span, '<i class="fa fa-comment"></i>'.html_safe, class: 'task-icon mission-control') %> |
|
| 22 |
+ <%= link_to ('#colapse_submission_'+ submission.id.to_s ), class: 'accordion-toggle', data: {toggle: 'collapse', parent: '#colapse_submissions'} do %>
|
|
| 23 |
+ <%= content_tag(:span, '', class: 'caret')%> |
|
| 24 |
+ <%= content_tag(:span, submission.agent_step.title, class: 'task-text') %> |
|
| 25 |
+ <% end %> |
|
| 22 | 26 |
<% end %> |
| 23 | 27 |
<% end %> |
| 24 |
- <% end %> |
|
| 25 |
- <%= content_tag(:div, class: 'panel-body collapse', id: ('colapse_submission_'+ submission.id.to_s )) do %>
|
|
| 26 |
- <%= content_tag(:div, class: "panel-content") do %> |
|
| 27 |
- <%= content_tag(:div, class: "panel-text") do %> |
|
| 28 |
- <%= submission.submission_contents.last.submission.content %> |
|
| 28 |
+ <%= content_tag(:div, class: 'panel-body collapse', id: ('colapse_submission_'+ submission.id.to_s )) do %>
|
|
| 29 |
+ <%= content_tag(:div, class: "panel-content") do %> |
|
| 30 |
+ <%= content_tag(:div, class: "panel-text") do %> |
|
| 31 |
+ <%= submission.submission_contents.last.submission.content %> |
|
| 29 | 32 |
|
| 30 |
- <% end %> |
|
| 33 |
+ <% end %> |
|
| 31 | 34 |
|
| 32 | 35 |
|
| 36 |
+ <% end %> |
|
| 33 | 37 |
<% end %> |
| 34 |
- <% end %> |
|
| 35 |
- <%= content_tag(:div, class: 'panel-footer') do %> |
|
| 36 |
- <%= content_tag(:div, class: 'agent-avatar pull-left') do %> |
|
| 37 |
- <% if submission.agent_step.mission_agent.user.avatar.file != nil %> |
|
| 38 |
- <%= image_tag submission.agent_step.mission_agent.user.avatar.to_s, size: "32x32", :class => 'img-circle' %> |
|
| 39 |
- <% else %> |
|
| 40 |
- <%= image_tag "user.png", size: "64x64", :class => 'img-circle' %> |
|
| 41 |
- <% end %> |
|
| 42 |
- <% end %> |
|
| 43 |
- <%= content_tag(:div, class: ' pull-left') do %> |
|
| 44 |
- <%= content_tag(:p, (submission.agent_step.mission_agent.user.full_name + ' <b>(' + submission.agent_step.mission_agent.role + ')</b>').html_safe, class: 'description') %>
|
|
| 45 |
- <%= content_tag(:p, time_ago_in_words(submission.created_at), class: 'sub-text') %><br> |
|
| 46 |
- <% end %> |
|
| 47 |
- <%= content_tag(:div, class: ' pull-right') do %> |
|
| 48 |
- <%= link_to((t 'mission_control.accept'), accept_step_submission_path(step_submission_id: submission.id), class: 'btn btn-success') %> |
|
| 49 |
- <%= link_to((t 'mission_control.reject'), reject_step_submission_path(step_submission_id: submission.id), class: 'btn btn-danger') %> |
|
| 50 |
- <% end %> |
|
| 38 |
+ <%= content_tag(:div, class: 'panel-footer') do %> |
|
| 39 |
+ <%= content_tag(:div, class: 'agent-avatar pull-left') do %> |
|
| 40 |
+ <% if submission.agent_step.mission_agent.user.avatar.file != nil %> |
|
| 41 |
+ <%= image_tag submission.agent_step.mission_agent.user.avatar.to_s, size: "32x32", :class => 'img-circle' %> |
|
| 42 |
+ <% else %> |
|
| 43 |
+ <%= image_tag "user.png", size: "32x32", :class => 'img-circle' %> |
|
| 44 |
+ <% end %> |
|
| 45 |
+ <% end %> |
|
| 46 |
+ <%= content_tag(:div, class: ' pull-left') do %> |
|
| 47 |
+ <%= content_tag(:p, (submission.agent_step.mission_agent.user.full_name + ' <b>(' + submission.agent_step.mission_agent.role + ')</b>').html_safe, class: 'description') %>
|
|
| 48 |
+ <%= content_tag(:p, time_ago_in_words(submission.created_at), class: 'sub-text') %><br> |
|
| 49 |
+ <% end %> |
|
| 50 |
+ <%= content_tag(:div, class: ' pull-right') do %> |
|
| 51 |
+ <%= link_to((t 'mission_control.accept'), accept_step_submission_path(step_submission_id: submission.id), class: 'btn btn-success') %> |
|
| 52 |
+ <%= link_to((t 'mission_control.reject'), reject_step_submission_path(step_submission_id: submission.id), class: 'btn btn-danger') %> |
|
| 53 |
+ <% end %> |
|
| 51 | 54 |
|
| 52 | 55 |
|
| 56 |
+ <% end %> |
|
| 57 |
+ <% end %> |
|
| 58 |
+ <% end %> |
|
| 59 |
+ <% else %> |
|
| 60 |
+ <%= content_tag(:ul, class: 'mission-editor-reward-list') do %> |
|
| 61 |
+ <%= content_tag(:li, class: 'span8', style: 'margin-top: 100px; margin-bottom: 150px;' ) do %> |
|
| 62 |
+ <%= content_tag(:div, class: "editor-reward-empty centered-editor-new") do %> |
|
| 63 |
+ <i class="icon-radar"></i><br> |
|
| 64 |
+ <%= content_tag(:p, (t 'mission_control.no_submissions_yet').html_safe) %> |
|
| 65 |
+ <% end %> |
|
| 53 | 66 |
<% end %> |
| 54 | 67 |
<% end %> |
| 55 | 68 |
<% end %> |
| 56 |
- |
|
| 57 | 69 |
|
| 58 | 70 |
<% end %> |
| 59 | 71 |
|
@@ -4,6 +4,7 @@ en: |
||
| 4 | 4 |
missions: 'Missions' |
| 5 | 5 |
notification: 'Notification' |
| 6 | 6 |
step: 'Step' |
| 7 |
+ mission_control: 'Mission Control' |
|
| 7 | 8 |
new_mission: 'New Mission' |
| 8 | 9 |
no_missions_yet: 'There are no missions yet. Create the first.' |
| 9 | 10 |
take_agent_role: 'Take Agent Role' |
@@ -20,6 +21,8 @@ en: |
||
| 20 | 21 |
agent: |
| 21 | 22 |
dashboard: 'Dashboard' |
| 22 | 23 |
account: 'Account' |
| 24 |
+ mission_control: |
|
| 25 |
+ no_submissions_yet: "No step submissions yet.<br>Wait for agents to complete some tasks." |
|
| 23 | 26 |
mission_editor: |
| 24 | 27 |
continue_later: 'continue later' |
| 25 | 28 |
launch_mission: 'Launch Mission' |
@@ -4,6 +4,7 @@ pt-BR: |
||
| 4 | 4 |
missions: 'Missões' |
| 5 | 5 |
notification: 'Notificação' |
| 6 | 6 |
step: 'Passo' |
| 7 |
+ mission_control: 'Base de Comando' |
|
| 7 | 8 |
new_mission: 'Nova Missão' |
| 8 | 9 |
no_missions_yet: 'Não existem missões ainda. Crie a primeira.' |
| 9 | 10 |
take_agent_role: 'Pegar o papel de agente' |